package com.zggk.lzz.bigpic;


import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import com.bumptech.glide.Glide;
import com.zggk.lzz.R;
import com.zggk.lzz.mvp.MVPBaseActivity;

import butterknife.Bind;
import butterknife.ButterKnife;


/**
 * MVPPlugin
 * 邮箱 784787081@qq.com
 */

public class BigPicActivity extends MVPBaseActivity<BigPicContract.View, BigPicPresenter> implements BigPicContract.View {

    @Bind(R.id.img)
    ImageView img;
    @Bind(R.id.backs)
    RelativeLayout backs;
    @Bind(R.id.layout)
    RelativeLayout layout;
    private String pic;

    @Override
    public void onRequestError(String msg) {

    }

    @Override
    protected int getLayout() {
        return R.layout.act_bigpic;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
        Bundle bundle = getIntent().getExtras();
        pic = bundle.getString("TPID");
        Glide.with(BigPicActivity.this)
                .load(pic)
                .into(img);
        backs.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }
}
